<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>结伴 - 骡窝窝</title>
    <meta name="viewport"
          content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no,minimal-ui,viewport-fit=cover"/>
    <meta name="copyright" content="Copyright (c) 2006-2019 Mafengwo."/>
    <meta name="format-detection" content="telephone=no,address=no"/>
    <meta name="referrer" content="always"/>
    <meta name="apple-mobile-web-app-capable" content="no"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="no"/>
    <meta property="og:title" content="结伴 - 骡窝窝"/>
    <meta property="og:url" content="https://m.mafengwo.cn/together/"/>
    <meta property="og:image" content="https://images.mafengwo.net/mobile/images/logo_2015.png"/>
    <meta property="og:description" content=""/>
    <link rel="apple-touch-icon" href="https://images.mafengwo.net/mobile/images/mfw-logo-new.png"/>
    <script type="text/javascript">
        window.Env = {
            "CNZZID": 30081550,
            "IS_MOBILE": true,
            "WWW_HOST": "www.mafengwo.cn",
            "IMG_HOST": "images.mafengwo.net",
            "W_HTTP": "https:\/\/w.mafengwo.cn",
            "P_HOST": "passport.mafengwo.cn",
            "P_HTTP": "https:\/\/passport.mafengwo.cn",
            "PAGELET_HTTP": "https:\/\/pagelet.mafengwo.cn",
            "JS_HOST": "js.mafengwo.net",
            "UID": 0,
            "CSTK": "f549ad71ce0425e80ec9be0b212db08e_bdcb34f8d38e93e99f59f5e71bee9b15",
            "GOOGLE_MAP_KEY": "AIzaSyD-Su0x_rPy1xehlMBcMyTqWkU49Bk53nQ"
        };
    </script>

    <link href="https://css.mafengwo.net/css/cv/mobile+css+head:mobile+css+ui^YVw^1526627473.css" rel="stylesheet"
          type="text/css"/>
    <link rel="stylesheet" href="/js/bootstrap-4.1.1-dist/css/bootstrap.min.css">
    <script src="/js/jquery/jquery.min.js"></script>
    <script src="/js/bootstrap-4.1.1-dist/js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="/css/font/css/font-awesome.min.css"/>
    <link rel="stylesheet" href="/css/reset.css"/>
    <link rel="stylesheet" href="/css/strategyCatalogs.css"/>
    <script src="/js/plugins/jrender/jrender.min.js"></script>
    <link rel="stylesheet" href="/js/plugins/dialog2/dialog.css" />
    <script src="/js/plugins/dialog2/dialog.min.js"></script>
    <script language="javascript" src="https://js.mafengwo.net/mobile/js/mate/t_index.js?1526627475" type="text/javascript"
            crossorigin="anonymous"></script>
</head>
<script>
    $(function () {

        var currentPage = 1;
        var travelsDate = [];
        var pages;
        var flag = false;//表示当前没有在查询
        $(function () {
            function loadCompanion() {
                if (flag) {
                    return;

                }

                flag = true;
                $.get("/companions", {currentPage: currentPage}, function (data) {
                    $.merge(travelsDate, data.list);
                    var ret = {"list": travelsDate}
                    $(".companions").renderValues(ret, {
                        getHref: function (item, value) {
                            //console.log(item);
                            console.log(value);
                            $(item).prop("href","/companionrequest.html?id="+value);
                        }
                    });
                    currentPage++
                    pages = data.pages;
                    flag = false;//表示查询完成
                });
            }

            loadCompanion();

            $(window).scroll(function () {
                if ($(window).height() + $(document).scrollTop() + 1 >= $(document).height()) {
                    if (pages >= currentPage) {
                        loadCompanion();

                    } else {
                        $(document).dialog({
                            type: 'notice',
                            infoText: '亲,到底了',
                            autoClose: 2500,
                            position: 'bottom'
                        });
                    }
                }
            })
        })
    })
</script>
<body>
<div id="pos38"></div>
<header class="head2home">
    <br>
    <a href="javascript:history.go(-1);">
        <span><i class="fa fa-chevron-left fa-2x"></i></span>
    </a>

    <div class="rBtn">
        <a href="/index.html" class="home">首页</a>
    </div>
</header>

<link href="https://css.mafengwo.net/mobile/css/together/together.css?1526627473" rel="stylesheet" type="text/css"/>
<section class="container" data-from="">
    <div class="top-num">
        <div class='popup_video'>
            <video autoplay loop  playsinline  style="z-index:-1" width="100%" -webkit-playsinline="true"
                   controls="controls"
                   src="//pic.ibaotu.com/00/21/25/00J888piCzwH.mp4"
                   type="video/mp4">
            </video>
        </div>

    </div>



    <div class="lists companions">
        <div class="row" render-loop="list">
            <div class="col-6">
                <a  render-key="list.id" render-fun="getHref">
                    <div class="cover">
                        <img render-src="list.coverUrl">
                        <div class="title">
                            <h3 render-html="list.title"></h3>
                            <span render-html="list.days"></span>
                        </div>
                        <span class="departure-date" render-html="list.goTime"> 出发</span>
                    </div>
                    <div class="info">
                        <span class="avatar"><img render-src="list.author.headImgUrl"></span>
                        <span class="name" render-html="list.author.nickName"></span>
                        <p class="txt" render-html="list.place"></p>
                    </div>
                </a>
            </div>
        </div>
    </div>



    <div class="fixed-btm ">
        <div class="btn-group">
            <a class="btn-add "  href="/mine/mycompanion.html">我的结伴</a>
            <a class="btn-add " href="/mine/editCompanions.html">发起结伴</a>
        </div>

    </div>
</section>


<script>
</script>

</body>
</html>
